"""
@File    : dos_CMD.py
@Author  : qve-wzy
@Time    : 2020/9/3 0003 9:18
"""
import os
class DosCmd:
    '''
    执行DOS命令,获取所有设备信息
    '''
    def excute_cmd_result(self,command):
        result_list = []
        result = os.popen(command).readlines()
        for i in result:
            if i =='\n':
                continue
            result_list.append(i.strip('\n'))
        return result_list

    def excute_cmd(self,command):
        os.system(command)

if __name__ == '__main__':
    dos = DosCmd()
    dos.excute_cmd('adb devices')